#include <iostream>

using namespace std;

int main()
{
    int a,n;
    cout<<"a = ";
    cin>>a;
    cout<<"n = ";
    cin>>n;
    int sum = 0;
    for(int i = 0; i < n; i ++)
    {
        sum += a;
        a += a*10;
    }
    cout<<"sum: "<<sum<<endl;

    return 0;
}
